#include "TestHostFunc.h"

#include "Logger.h"
#include "cstdarg"
namespace test_host_func {
void testFunction(unsigned int num) { logInfo("in testFunction: " + std::to_string(num) + "\n"); }

void testSum(unsigned int argc, ...) {
  logInfo("in testSum: " + std::to_string(argc) + "\n");
  int sum = 0;
  va_list args;
  va_start(args, argc);
  for (int i = 0; i < argc; i++) {
    auto val = va_arg(args, int);
    logInfo("idx: " + std::to_string(i) + ", val" + std::to_string(val) + "\n");
    sum += val;
  }
  va_end(args);
  logInfo(" sum: " + std::to_string(sum) + "\n");
}
}  // namespace test_host_func